﻿Imports System.Xml

Public Class LightBrowser : Inherits WebBrowser

	Sub Q(Text As String)
		Document.Write(Text)
	End Sub

	Sub Q(Text As String, ParamArray Values() As String)
		Dim i = 0
		Do
			Dim Pos = InStr(Text, "@")
			If Pos = 0 Then Exit Do
			For x = Pos + 1 To Text.Length
				If Not Char.IsLetterOrDigit(Mid(Text, x, 1)) Then
					Text = Text.Replace(Mid(Text, Pos, x - Pos), Values(i))
					i += 1
					Exit For
				End If
			Next
		Loop
		Q(Text)
	End Sub

	Sub Clear()
		If Document Is Nothing Then
			Navigate("about:blank")
		Else
			Document.OpenNew(False)
		End If
		Document.Write("<style>td {font:9pt segoe ui}</style>")
	End Sub

End Class